package legumes.client.services.callbacks;

import legumes.client.services.LegumesServicesHelper;
import legumes.client.services.util.rpc.SequencableRPCCall;
import legumes.shared.domain.ProductCategory;

public class GetProductCatagoriesCallback extends SequencableRPCCall<ProductCategory []> {

	private ProductCategory [] pvAr;
	
	public GetProductCatagoriesCallback() {
	}

	@Override
	protected void doCall() {
		LegumesServicesHelper.LEGUMES_SERVICES.getProductCategories(this);
	}

	@Override
	public void onSuccess(ProductCategory [] pvAr_) {
		pvAr = pvAr_;
		callNext();
	}

	public ProductCategory [] getProductCategories() {
		return pvAr;
	}

}
